
<%@ page import="auction.Auction" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'auction.label', default: 'Auction')}" />
        <title><g:message code="default.show.label" args="[entityName]" /></title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><g:link class="list" action="list">Auktionsliste</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">Auktion anlegen</g:link></span>
       <br>
        </div>
        <div class="body col_6 col">
       <br>
            <h1>${fieldValue(bean: auctionInstance, field: "heading")}</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>


			<auction:bidForm auction="${auctionInstance }"/>
            
            <div class="dialog">
                <table>
                    <tbody>
                    
                        <tr class="prop">
                            <td valign="top" class="name">Startdatum</td>
                            
                            <td valign="top" class="value"><g:formatDate date="${auctionInstance?.startDate}" format="dd/MM/yyyy"/></td>
                            
                        </tr>
                        
                        <tr class="prop">
                            <td valign="top" class="name">Ende</td>
                            
                            <td valign="top" class="value"><g:formatDate date="${auctionInstance?.endDate}" format="dd/MM/yyyy"/></td>
                            
                        </tr>
                    
                       
                    
                        <tr class="prop">
                            <td valign="top" class="name">Startpreis</td>
                            
                            <td valign="top" class="value">${fieldValue(bean: auctionInstance, field: "startprice")} &euro;</td>
                            
                        </tr>
                    
                    </tbody>
                </table>
                          
            </div>
            
        </div>
            <div class=" Bild col_5 col">
                    <g:render template="/bid/entry"/> 
     		</div>
            
            <div class="col_12 col">
                <h2>Beschreibung</h2>
                   <p>${fieldValue(bean: auctionInstance, field: "description")}</p>
                
                <g:if test="${session.user?.id == auctionInstance.user?.id}">
            <div class="buttons">
                <g:form>
                    <g:hiddenField name="id" value="${auctionInstance?.id}" />
                    <span class="button"><g:actionSubmit id="generalButton" class="edit" action="edit" value="Bearbeiten" /></span>
                    <span class="button"><g:actionSubmit id="generalButton" class="delete" action="delete" value="L&ouml;schen" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
                </g:form>
            </div>
            </g:if>
               
            </div>
                
            
       
        <br>
    </body>
</html>
